// TOWN SPECIAL ENCOUNTERS
//    Town 62: The Great Circle

beginzonescript;

variables;

short im_hostile = 0;
short max_crime = 200;
short last_abil;
short counter = 0;
short set_ter = 0;

body;

beginstate INIT_STATE;
	last_abil = get_current_tick();

//	set_name(,);
//	add_range_to_group(,,groupn);


	set_crime_tolerance(max_crime);

	break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
	if ((set_ter == 0) && (char_ok(6201))) {
		set_ter = 1;
		set_name(6201,"Haakai Lord");
		set_boss_level(6201,1);
		set_name(6200,"Haakai Lord");
		set_boss_level(6200,1);
		set_name(6209,"Haakai Lord");
		set_boss_level(6209,1);
		
		if (difficulty() > 1) {
			set_new_abil(6201,9);
			set_new_abil(6200,12);
			set_new_abil(6209,38);
			}
		}
		
	if ((char_ok(6200)) || (char_ok(6201)) || (char_ok(6209))) {
		if (char_ok(get_pc_id(0))) {
			if (dist_to_nav_point(get_pc_id(0),0) >= 10) {
				print_str_color("The dark magic of the altar yanks you back!",2);
				relocate_char(get_pc_id(0),30,31,0);
				}
			}
		if (char_ok(get_pc_id(1))) {
			if (dist_to_nav_point(get_pc_id(1),0) >= 10) {
				print_str_color("The dark magic of the altar yanks you back!",2);
				relocate_char(get_pc_id(1),32,31,0);
				}
			}
		if (char_ok(get_pc_id(2))) {
			if (dist_to_nav_point(get_pc_id(2),0) >= 10) {
				print_str_color("The dark magic of the altar yanks you back!",2);
				relocate_char(get_pc_id(2),32,33,0);
				}
			}
		if (char_ok(get_pc_id(3))) {
			if (dist_to_nav_point(get_pc_id(3),0) >= 10) {
				print_str_color("The dark magic of the altar yanks you back!",2);
				relocate_char(get_pc_id(3),30,33,0);
				}
			}
		
		}
		else {
			if ((gf(62,2) == 2) && (gf(62,11) == 0)) {
				sf(62,11,1);
				ok_dlog(36,2);
				}
			}
break;

beginstate 10;
break;

beginstate 11;
break;

beginstate 12;
break;

beginstate 13;
break;

beginstate 14;
break;

//	print_str("");
//	set_terrain_string_range("",1);
//	set_terrain_string_range("The sign says - .",1);

